import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login'
import home from '@/view/home'
import homeComponent from '@/components/homeComponent'
import List1 from '@/components/list1'
import List2 from '@/components/list2'
import List3 from '@/components/list3'
import List4 from '@/components/list4'

Vue.use(Router)

export default new Router({
	routes: [{
			path: '/',
			name: 'login',
			component: login
		},
		{
			path: '/view',
			name: 'home',
			component: home,
			redirect:'/components/homeComponent',
			children: [{
					path: '/components/homeComponent',
					name: '首页',
					component: homeComponent
					
				},{
					path: '/components/List1',
					name: '项目介绍',
					component: List1
				},
				{
					path: '/components/List2',
					name: '表单',
					component: List2
				},
				{
					path: '/components/List3',
					name: '表格',
					component: List3
				},
				{
					path: '/components/List4',
					name: '组件',
					component: List4
				}
			]
		}
	]
})